package com.sky.backend.system.service;

import com.sky.backend.system.dao.SystemUserMapper;
import com.sky.backend.system.entity.SystemUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SystemUserService {
    @Autowired
    protected SystemUserMapper systemUserMapper;

    public int insert(SystemUser entity) {
        return systemUserMapper.insert(entity);
    }

    public int deleteByPrimaryKey(Long id) {
        return systemUserMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKey(SystemUser record) {
        return systemUserMapper.updateByPrimaryKey(record);
    }

    public List<SystemUser> selectAll() {
        return systemUserMapper.selectAll();
    }

    public SystemUser selectByUsernamePassword(SystemUser user) {
        return systemUserMapper.selectByUsernamePassword(user);
    }
}